home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / config / dummy / exception. < prev    next >
Text File  |  1996-09-12  |  584b  |  29 lines

  1. #include <exec/execbase.h>
  2. #include <clib/exec_protos.h>
  3. #include <machine.h>
  4.  
  5. void exception(struct ExecBase *SysBase)
  6. {
  7.     struct Task *me=SysBase->ThisTask;
  8.     ULONG sig;
  9.     APTR data;
  10.     BYTE idn;
  11.     me->tc_Flags&=~TF_EXCEPT;
  12.     idn=SysBase->IDNestCnt;
  13.     SysBase->IDNestCnt=0;
  14.     for(;;)
  15.     {
  16.         sig=me->tc_SigExcept&me->tc_SigRecvd;
  17.         if(!sig)
  18.             break;
  19.         me->tc_SigExcept^=sig;
  20.         me->tc_SigRecvd ^=sig;
  21.         data=me->tc_ExceptData;
  22.         Enable();
  23.         sig=((ULONG(*)(ULONG,APTR,struct ExecBase*))me->tc_ExceptCode)
  24.             (sig,data,SysBase);
  25.         Disable();
  26.         me->tc_SigExcept|=sig;
  27.     }
  28.     SysBase->IDNestCnt=idn;
  29. }